from flask_migrate import Migrate,MigrateCommand

from flask_script import Manager

from config import ProductionConfig,DevelopementConfig
from info import config_app ,db
from info import models

#转移
# #通过create_app传递不同的配置信息实现不同的qidong 以不同的模式来启动
app = config_app(DevelopementConfig)

manager = Manager(app)
#5.2创建迁移对象
migrate = Migrate(app,db)
#5.3Manager绑定迁移命令
manager.add_command('db',MigrateCommand)




if __name__ == '__main__':
    manager.run()